package com.gary.mapper;

import com.gary.entity.Department;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

/**
 * @Mapper 指定这是一个操作数据库的Mapper
 * @author pengrui
 * @date 2020/11/25 - 16:24
 */
//@Mapper
public interface IDepartmentMapper {

    @Select("select * from department where id = #{id}")
    Department queryById(Integer id);

    @Insert("insert into department(id, depart_name) values(#{id}, #{departName})")
    void insertDept(Department department);
}
